package com.fr.schedule.task;

import com.fr.data.core.db.dml.Table;
import com.fr.data.core.db.tableObject.AbstractTableObject;
import com.fr.data.core.db.tableObject.ColumnSize;
import com.fr.data.dao.CommonFieldColumnMapper;
import com.fr.data.dao.FieldColumnMapper;
import com.fr.data.dao.ObjectTableMapper;

/**
 * @author richie
 * @date 2015-03-12
 * @since 8.0
 */
public class SAPObjectTableMapper extends ObjectTableMapper {
    public SAPObjectTableMapper() {
        setObjectClass(SAPSynTask.class);
        setTable(new Table(SAPSynTask.TABLE_NAME));
        setFieldColumnMappers(new FieldColumnMapper[]{
                ItriggerTask.ID,
                ItriggerTask.NAME,
                ItriggerTask.DES,
                ItriggerTask.REPEATTIME,
                ItriggerTask.REPEATTIMES,
                ItriggerTask.COUNTS,
                ItriggerTask.ITRIGGER,
                ItriggerTask.TASKPARAMETERS,
                new CommonFieldColumnMapper("transfers", java.sql.Types.VARCHAR, new ColumnSize(511)),
        });
        setCheckTableExistLevel(AbstractTableObject.CHECK_TABLE_EXSIT_ON_TABLENAME);
    }
}
